<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //[1<2<3,3<2<1]解析成什么？
       // a = 1 < 2 < 3;
       // console.log(a);
       // b = 1 > 2 > 3;
       // console.log(b);
       console.log([1<2<3,3<2<1])
       console.log([true<3,false<1])
       console.log([1<3,0<1])
       console.log([true,true])
    </script>

    <script>
        //判断输出
        //var a = !!(true + '1') === 'string'
        //console.log(a)
        if(''){
            console.log('daynfvd')
        }
        console.log(!!(true + '1') === 'string')
    </script>

    <script>
        //编写一个函数，判断一个数是不是质数
        function judg(num){
            var iszs = true;
            for(var i = 2; i < num; i++){
                if(num % i === 0){
                    iszs = false;
                }
            }
            return iszs
        }
        function findzs(n){
            for(var i = 2; i <= n; i++){
                if(judg(i)){
                    console.log(i);
                }
            }
        }
        findzs(10)
    </script>

    <script>
        //判断是不是素数 
        function iszhishu(n){
            var count = 0
            for(var i = 1; i <= n; i++){
                if(n%i === 0){
                    count = count + 1
                }
            }
            console.log(count)
            if(count <= 2){
                return true
            }else{
                return false
            }
        }
        console.log(iszhishu(10))
    </script>
</body>
</html>